package com.woniuxy.service.impl;

import com.woniuxy.dao.OrderLineMapper;
import com.woniuxy.pojo.OrderLine;
import com.woniuxy.service.OrderLineService;
import com.woniuxy.util.DataGridView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class OrderLineServiceImpl implements OrderLineService {
    @Autowired
    private OrderLineMapper orderLineMapper;

    @Override
    public DataGridView selectOrderLineByLineOrdeNo(int lineOrdeNo) {
        List<OrderLine> orderLines = orderLineMapper.selectOrderLineByLineOrdeNo(lineOrdeNo);
        return new DataGridView(Long.valueOf(orderLines.size()),orderLines);
    }

    @Override
    public DataGridView selecttotalBy(int lineOrdeNo) {
        List<OrderLine> ordertotal = orderLineMapper.selecttotalBy(lineOrdeNo);
        return new DataGridView(Long.valueOf(ordertotal.size()),ordertotal);
    }


}